package br.com.infoserver.volatilidade.to;

import java.io.Serializable;

import br.com.infoserver.volatilidade.CalculoPrecoOpcaoValues;
import br.com.infoserver.volatilidade.EstiloValues;

public class CalculoPrecoOpcaoTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7934703525573913783L;
	
	private Double dS;
	private Double dX;
	private Double dVol;
	private Double drF;
	private Double dT;
	private Double dQ;
	private Double dN;
	private CalculoPrecoOpcaoValues dTipoOpcao;
	private EstiloValues dEstilo;

	public Double getdS() {
		return dS;
	}

	public void setdS(Double dS) {
		this.dS = dS;
	}

	public Double getdX() {
		return dX;
	}

	public void setdX(Double dX) {
		this.dX = dX;
	}

	public Double getdVol() {
		return dVol;
	}

	public void setdVol(Double dVol) {
		this.dVol = dVol;
	}

	public Double getDrF() {
		return drF;
	}

	public void setDrF(Double drF) {
		this.drF = drF;
	}

	public Double getdT() {
		return dT;
	}

	public void setdT(Double dT) {
		this.dT = dT;
	}

	public Double getdQ() {
		return dQ;
	}

	public void setdQ(Double dQ) {
		this.dQ = dQ;
	}

	public Double getdN() {
		return dN;
	}

	public void setdN(Double dN) {
		this.dN = dN;
	}

	public CalculoPrecoOpcaoValues getdTipoOpcao() {
		return dTipoOpcao;
	}

	public void setdTipoOpcao(CalculoPrecoOpcaoValues dTipoOpcao) {
		this.dTipoOpcao = dTipoOpcao;
	}

	public EstiloValues getdEstilo() {
		return dEstilo;
	}

	public void setdEstilo(EstiloValues dEstilo) {
		this.dEstilo = dEstilo;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((dEstilo == null) ? 0 : dEstilo.hashCode());
		result = prime * result + ((dN == null) ? 0 : dN.hashCode());
		result = prime * result + ((dQ == null) ? 0 : dQ.hashCode());
		result = prime * result + ((dS == null) ? 0 : dS.hashCode());
		result = prime * result + ((dT == null) ? 0 : dT.hashCode());
		result = prime * result 
				+ ((dTipoOpcao == null) ? 0 : dTipoOpcao.hashCode());
		result = prime * result + ((dVol == null) ? 0 : dVol.hashCode());
		result = prime * result + ((dX == null) ? 0 : dX.hashCode());
		result = prime * result + ((drF == null) ? 0 : drF.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CalculoPrecoOpcaoTO other = (CalculoPrecoOpcaoTO) obj;
		if (dEstilo != other.dEstilo)
			return false;
		if (dN == null) {
			if (other.dN != null)
				return false;
		} else if (!dN.equals(other.dN))
			return false;
		if (dQ == null) {
			if (other.dQ != null)
				return false;
		} else if (!dQ.equals(other.dQ))
			return false;
		if (dS == null) {
			if (other.dS != null)
				return false;
		} else if (!dS.equals(other.dS))
			return false;
		if (dT == null) {
			if (other.dT != null)
				return false;
		} else if (!dT.equals(other.dT))
			return false;
		if (dTipoOpcao != other.dTipoOpcao)
			return false;
		if (dVol == null) {
			if (other.dVol != null)
				return false;
		} else if (!dVol.equals(other.dVol))
			return false;
		if (dX == null) {
			if (other.dX != null)
				return false;
		} else if (!dX.equals(other.dX))
			return false;
		if (drF == null) {
			if (other.drF != null)
				return false;
		} else if (!drF.equals(other.drF))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "CalculoPrecoOpcaoTO [getdS()=" + getdS() + ", getdX()="
				+ getdX() + ", getdVol()=" + getdVol() + ", getDrF()="
				+ getDrF() + ", getdT()=" + getdT() + ", getdQ()=" + getdQ()
				+ ", getdN()=" + getdN() + ", getdTipoOpcao()="
				+ getdTipoOpcao() + ", getdEstilo()=" + getdEstilo()
				+ ", hashCode()=" + hashCode() + "]";
	}
	
}
